[qemu/ia64] Sync ID cache only guest do DMA read.
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Tue, 15 Aug 2006 12:53:18 +0000 (13:53 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Tue, 15 Aug 2006 12:53:18 +0000 (13:53 +0100)
Fix ID cache sync time. Only when guest does DMA
read, ID sync cache is needed for VTi.

From: Zhang, Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/ioemu/target-i386-dm/exec-dm.c

index af97adf7d8f93900e13042a89a7792db5f89bd44..cd7af5583fc5cb0d191fb6890b7508d8981ba6e3 100644 (file)
@@ -449,6 +449,9 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
                 /* RAM case */
                 ptr = phys_ram_base + addr1;
                 memcpy(ptr, buf, l);
+#ifdef __ia64__
+                sync_icache((unsigned long)ptr, l);
+#endif 
             }
         } else {
             if (io_index) {
@@ -473,9 +476,6 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
                 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + 
                     (addr & ~TARGET_PAGE_MASK);
                 memcpy(buf, ptr, l);
-#ifdef __ia64__
-                sync_icache((unsigned long)ptr, l);
-#endif 
             } else {
                 /* unreported MMIO space */
                 memset(buf, 0xff, len);